#include "main.h"

volatile uint* GPCCON;
volatile uint* GPCDAT;
volatile uint* GPCPUD;

volatile uint* GPKCON0;
volatile uint* GPKCON1;
volatile uint* GPKDAT;
volatile uint* GPKPUD;

volatile uint* GPLCON0;
volatile uint* GPLCON1;
volatile uint* GPLDAT;
volatile uint* GPLPUD;
/************led灯测试********/
volatile uint* GPMCON;
volatile uint* GPMDAT;
volatile uint* GPMPUD;

 volatile uint* GPNCON;
 volatile uint* GPNDAT;
 volatile uint* GPNPUD;


 volatile uint* GPPCON;
 volatile uint* GPPDAT;
 volatile uint* GPPPUD;

 volatile uint* GPQCON;
 volatile uint* GPQDAT;
 volatile uint* GPQPUD;

 volatile uint* GPECON;
 volatile uint* GPEDAT;
 volatile uint* GPEPUD;

 volatile uint* GPOCON;
 volatile uint* GPODAT;
 volatile uint* GPOPUD;

 volatile uint* GPFCON;
 volatile uint* GPFDAT;

 bool workable;
 bool cooling_water;
 bool sterilizing;
 bool water_valve_isopen;
 bool water_supply_isopen;
 bool heating_valve_isopen;
 bool Vacuum_pump_isopen;
 bool air_supply_valve_isopen;
 bool air_intake_valve_isopen;
 bool exhaust_valve_isopen;

 bool Vacuum_pump_workable;
 bool door_closed_OK;
 bool workDone;
 bool continuous_mode;
 bool test_mode;
 bool config_changed;
 bool auto_heating;
 bool sensor_data_changed;
 //bool IO_drive_type;
// bool cmd_action;
 bool bottom_water_level_isreached;//下水位
 bool top_water_level_isreached;//上水位
 bool water_switch_isopen;//GPC0//水流开关
 bool inter_pressure_switch_isreached;//夹层压力开关
 bool front_door_closed_in_place;//GPC2
 bool front_door_opened_in_place;//GPC3
 bool front_door_Sealing_strip_pressure_in_place;// GPN6
 bool back_door_opened_in_place;//GPN9
 bool back_door_closed_in_place;//GPN11
 bool back_door_Sealing_strip_pressure_in_place;// GPL8
 bool overpressure_protection_switch_isreached;
 bool water_level_failure;
 bool backdoor_canopen;
 bool door_detection_failure;

 float TEM;
 float reference_f0;
 int PSU;

 int water_valve_pin;
 int heating_valve_pin;
 int air_intake_valve_pin;
 int exhaust_valve_pin;
 int Vacuum_pump_pin;
 int air_supply_valve_pin;
 int open_front_door_pin;
 int close_front_door_pin;
 int front_door_Sealing_strip_Inflation_pin;
 int front_door_Sealing_strip_Exhaust_pin;
 int open_back_door_pin;
 int close_back_door_pin;
 int back_door_Sealing_strip_Inflation_pin;
 int back_door_Sealing_strip_Exhaust_pin;

 int sterilization_temperature;
 int sterilization_time;
 int pulsing_times;
 int pulsing_lowest_pressure;
 int pulsing_highest_pressure;
 int prebalance_time;
 int dry_pressure;
 int dry_times;
 int sterilization_stage;
 int cold_exhaust_times;
 int cold_exhaust_pressure;
 int heat_delay_time;
 int ad_value[8];
 int dry_keep_time;
 int recdnr;
 uint vacuum_door_Sealing_strip_Exhaust_time_ms;
 uint bottom_door_Sealing_strip_Exhaust_time_ms;

 char AD_VALUE[8][8];

 QString str_sterilization_type;
// QMutex mutex;

 protype sterilization_protype;
 door_action door_actions;
 error_status breakdown;
 waterlevel  water;

  QMap<QString,int >  textiles_datamap;
  QMap<QString,int >  metals_datamap;
  QMap<QString,int >  bottom_datamap;
  QMap<QString,int >  liquid_datamap;
  QMap<QString,int >  user_define1_datamap;
  QMap<QString,int >  user_define2_datamap;
  QMap<QString,int >  user_define3_datamap;
  QMap<QString,int >  sensor_adjust_datamap;
  QMap<QString,int >  IO_setting_datamap;

  QPair<int,bool> cmd_code_pair;
  QQueue<QPair<int,bool> > command_queue;
  QTextBrowser* textbrowser;

 QPalette redtextpal;
 QPalette blacktextpal;
 QPalette greentextpal;
 QPalette bluetextpal;

  PWM* pwm;
  sterilization_type* stype;
  printer* serialprinter;
  warn* WARN;
  door_operations* door_operation;
  Password_input* input;
  mythread* controller;
  monitor* monitor_program;
  MVCD* MCD_Interface;
  machine_parameter whole_machine_parameter;
  MyMessageBox* messagebox;
  tracker* track;
  data_acquisation* AD_data;
